package vis.app.schedule;

import java.util.LinkedList;
import java.util.Observable;
import java.util.Queue;

//TODO REMOVE not used

public class AnimationJobSchedule extends Observable {
	private static AnimationJobSchedule _instance = null;
	public static Queue<String> highlightJobs = new LinkedList<String>();

	public static AnimationJobSchedule getInstance() {
		if (null == _instance) {
			_instance = new AnimationJobSchedule();
		}
		return _instance;
	}

	public void addHighlightJob(String lineNumber) {
		highlightJobs.add(lineNumber);
	}

	public String getNextHighlightJob() {
		String nextJob = "";
		if (!highlightJobs.isEmpty()) {
			nextJob = highlightJobs.poll();
		}
		return nextJob;
	}

	public void startPushJobs() {
		highlightJobs.clear();
	}

	public void endPushJobs() {
		// if (!highlightJobs.isEmpty()) {
		// EventControl evt = new EventControl(AppController.JOBS_ANIMATION, "",
		// "");
		// evt.setData(highlightJobs.toArray(new String[0]));
		// setChanged();
		// notifyObservers(evt);
		// }
	}
}
